package com.zqu.service.impl;

import com.zqu.mapper.ReimbursementCheckMapper;
import com.zqu.pojo.ReimbursementCheck;
import com.zqu.service.ReimbursementCheckService;
import com.zqu.service.ReimbursementService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ReimbursementCheckServiceImpl implements ReimbursementCheckService {
    @Resource
    private ReimbursementCheckMapper reimbursementCheckMapper;
    @Override
    public ReimbursementCheck findT(ReimbursementCheck reimbursementCheck) {

        return reimbursementCheckMapper.selectTById(reimbursementCheck.getId());
    }

    @Override
    public List<ReimbursementCheck> selectList(ReimbursementCheck reimbursementCheck) {
        return reimbursementCheckMapper.selectList(reimbursementCheck);
    }

    @Override
    public boolean insertT(ReimbursementCheck reimbursementCheck) {
        int flag = reimbursementCheckMapper.insertT(reimbursementCheck);
        if(flag>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean updateT(ReimbursementCheck reimbursementCheck) {
        int flag = reimbursementCheckMapper.updateT(reimbursementCheck);
        if(flag>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean deleteT(long id) {
        int flag = reimbursementCheckMapper.deleteT(id);
        if(flag>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean deleteTByIds(String[] ids) {
        int flag = reimbursementCheckMapper.deleteTByIds(ids);
        if(flag>0){
            return true;
        }
        return false;
    }
}
